#include <stdio.h>

void swap(int *pa, int *pb);

int main() {
    int a, b;

    a = 4;
    b = 5;

    printf("before swap: a = %d, b = %d\n", a, b);

    swap(&a, &b);

    printf("after swap: a = %d, b = %d\n", a, b);
}

void swap(int *pa, int *pb) {
    int temp;

    temp = *pa;
    *pa = *pb;
    *pb = temp;
}
